package com.zjx.mhxykey.net;

import android.annotation.SuppressLint;
import android.nfc.Tag;
import android.util.Log;

import com.llw.network.NetworkApi;
import com.llw.network.observer.BaseObserver;

public class UpNet {

    @SuppressLint("CheckResult")
    public static void upData(String key) {
        if (key.length() < 6) return;
        NetworkApi.createService(ApiService.class)
                .updateGeneralOrder(new GeneralOrderReq("17783859813", key))
                .compose(NetworkApi.applySchedulers(new BaseObserver<Result<String>>() {

                    @Override
                    public void onSuccess(Result<String> carouselResponse) {
                        Log.d("CommandReceiver", "上传成功");
                    }

                    @Override
                    public void onFailure(Throwable e) {
                        Log.d("CommandReceiver", "上传失败:"+e.toString());
                    }
                }));
    }
}
